import {API_TransmitUrl} from './baseUrl'
import {parseUrl} from "../utils/function";

const transmitUrlToVisit = (url, baseUrl = API_TransmitUrl()) => {
   const {protocol = 'http', host = '', port = '', relative = ''} = parseUrl(url)
   return `${baseUrl}${protocol == 'https' ? '/https' : ''}/host${host}/port${port}${relative}`
}
export {
   transmitUrlToVisit,
}
